1. Field of the Invention
Embodiments of the present invention relate to the field of data compression and data management. More specifically, embodiments of the present invention relate to the field of using data compression to increase available memory to a computer system, e.g., for use by an operating system, application program, driver, etc.
2. Related Art
Prior art computer systems extend available memory resources by data compression. Well known compression techniques exist for reducing the size of digital data while retaining the information stored in the data. Data compression has many advantages, including extending the available amount of memory resources available to a computer system as well as increasing system performance by reducing the amount of required read and write accesses to a disk storage unit. The amount of compression that is achievable for any piece of data depends largely on the nature of the data being compressed.
FIG. 1A illustrates one prior art system 10 for performing compression to extend the available memory available to a computer system. In system 10, an application software program 18 interfaces with an operating system 14. The application software program 18 maintains data in “virtual memory” while the operating system 14 maintains data in “physical memory.” A virtual memory manager 16 performs the task of “paging” memory blocks between the volatile memory 12 and the disk storage unit 22, as required by the application program 18, and also maintains a mapping between the virtual memory and the physical memory. Paging, performed by the memory manager 16, involves storing infrequently used memory pages onto disk 22 while maintaining frequently used memory pages in volatile memory 12, e.g., random access memory (RAM).
In the system 10 shown in FIG. 1A, the memory pages stored on disk 22 are stored in compressed form. By compressing the pages, more information can be stored on the disk 22 and also system performance increases because fewer read and write accesses are used to access and store the information. System 10 utilizes software compression/decompression techniques to compress and decompress the memory pages which are supplied to, and received from, the operating system. While having the advantages of increased memory capacity and higher system performance, system 10 also has its disadvantages. One disadvantage is that system 10 requires a specialized operating system to process the compressed pages to and from the disk 22. Many commercially available operating systems do not recognize compression of the memory pages from disk 22 and therefore are incompatible with the techniques employed by system 10. Another disadvantage of system 10 is that it utilizes software decompression/compression processes which demand large amounts of processor resources and are relatively slow to perform. Again, software decompression and compression processes require specialized operating systems that have provision for these tasks.
FIG. 1B illustrates memory mapping diagrams 30 of another system that implements memory page compression/decompression. In this prior art system, the compress/decompression engine may be hardware based. In this system, the application program understands a virtual memory map 32 which contains uncompressed pages and maps to a physical memory space 34 that is presented to the operating system. This physical memory space 34 contains uncompressed pages. One uncompressed memory page 36 is shown. However, the on-chip volatile memory stores memory pages according to another physical memory map 38 which may store compressed pages as well as some uncompressed pages. One compressed page 40 is shown and one uncompressed page 42 is shown. In well known fashions, memory pages from the physical memory space are paged out and retrieved from the disk drive 22 as needed by the operating system. The disk 22 may store uncompressed pages due to the hardware compression/decompression engine. Because compression is employed in the volatile memory, the physical memory map 34 shown to the operating system appears larger than the actual volatile memory capacity of the computer system (e.g., physical memory space 38). The extra space of physical memory map 34 is depicted as a dashed region 35.
Although the hardware compression/decompression engine performs better than the software compression/decompression processes employed by the prior art system of FIG. 1A, the prior art system of FIG. 1B still has its disadvantages. One disadvantage of the system described with respect to FIG. 1B is that the physical memory space 34 made available to the operating system varies in size depending on the achievable compression ratio employed in the physical memory space 38. The compression ratio depends on the nature of the data being compressed. For instance, assuming no pages could be compressed, e.g., a worst case compression scenario, then physical memory space 34 would be equal physical memory space 38 in size. However, as the compression ratio improves, physical memory space 34 increases in size. Therefore, physical memory space 34 varies in size dynamically depending on the nature of the data stored in the pages of the physical memory. This poses a great challenge because most operating systems are incompatible with a physical memory space that varies in size dynamically. In contrast, most commercial operating systems require a physical memory space of a fixed size, otherwise catastrophic memory overruns can occur.
Therefore, the above described memory page compression techniques of the prior art are incompatible with most commercially available operating systems.